<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    const date = prompt("输入星期")
    switch (date) {
        case "星期一":
            alert("一");
            break;
        case "星期二":
            alert("二");
            break;
        case "星期三":
            alert("三");
            break;
        case "星期四":
            alert("四");
            break;
        case "星期五":
            alert("五");
            break;
        case "星期六":
            alert("六");
            break;
        case "星期日":
            alert("日");
            break;
        default:
            alert("NO")
    }
</script>
</body>
</html>